package com.easyapi.dao.entity.api;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.easyapi.dao.entity.BaseModel;
import java.io.Serializable;
import java.util.Date;

import lombok.*;

/**
 * api申请表
 */
@Data
@EqualsAndHashCode(callSuper=true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "api_center_apply")
public class ApiCenterApply extends BaseModel implements Serializable {
    private static final long serialVersionUID = 2068096213008841135L;
    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 是否删除1--删除
     */
    @TableField(value = "is_deleted")
    private Boolean isDeleted;

    /**
     * API_ID
     */
    @TableField(value = "api_id")
    private Long apiId;

    @TableField(value = "user_id")
    private Long userId;

    /**
     * 申请内容
     */
    @TableField(value = "apply_content")
    private String applyContent;

    /**
     * 回复内容
     */
    @TableField(value = "reply_content")
    private String replyContent;

    @TableField(value = "reply_time")
    private Date replyTime;

    /**
     * 0:审核中/1:通过/2:拒绝
     */
    @TableField(value = "`status`")
    private Byte status;

    /**
     * 申请次数限制，-1表示无限制
     */
    @TableField(value = "call_limit")
    private Integer callLimit;

    /**
     * 申请周期开始时间
     */
    @TableField(value = "begin_time")
    private Date beginTime;

    /**
     * 申请周期结束时间
     */
    @TableField(value = "end_time")
    private Date endTime;

    /**
     * api调用时的token，默认为空或null
     */
    @TableField(value = "token")
    private String token;
}